using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace backend.Models.Dtos
{
    public class MaintenanceManCreateDto
    {
        public string MId { get; set; } = null!;
        public string PId { get; set; } = null!;
    }

    public class MaintenanceManAllUpdateDto
    {
        [JsonPropertyName("name")]
        public string UName { get; set; } = null!;
        [JsonPropertyName("phoneNumber")]
        public string UContact { get; set; } = null!;
        [JsonPropertyName("specialize")]
        public string PId { get; set; } = null!;
        [JsonPropertyName("joinTime")]
        public DateOnly MHiredate { get; set; }
        [JsonPropertyName("isResigned")]
        public bool MIsResigned { get; set; }
    }

    public class UserUpdateDto
    {
        [JsonPropertyName("name")]
        public string UName { get; set; } = null!;
        [JsonPropertyName("phoneNumber")]
        public string UContact { get; set; } = null!;
    }

    public class MaintenanceManUpdateDto
    {
        [JsonPropertyName("specialize")]
        public string PId { get; set; } = null!;
        [JsonPropertyName("joinTime")]
        public DateOnly MHiredate { get; set; }
        [JsonPropertyName("isResigned")]
        public bool MIsResigned { get; set; }
    }

    public class MaintenanceManReturnDto
    {
        [JsonPropertyName("userID")]
        public string UId { get; set; } = null!;
        [JsonPropertyName("name")]
        public string UName { get; set; } = null!;
        [JsonPropertyName("specialize")]
        public string USpecialize { get; set; } = null!;

        [JsonPropertyName("averageResponseTime")]
        public decimal? MAverageResponseTime { get; set; }

        [JsonPropertyName("averageQuality")]
        public decimal? MAverageQuality { get; set; }

        [JsonPropertyName("averageAttitude")]
        public decimal? MAverageAttitude { get; set; }
    }

    public class SpecificMaintenanceManReturnDto
    {
        [JsonPropertyName("userID")]
        public string UId { get; set; } = null!;
        [JsonPropertyName("name")]
        public string UName { get; set; } = null!;
        [JsonPropertyName("phoneNumber")]
        public string UContact { get; set; } = null!;
        [JsonPropertyName("specialize")]
        public string USpecialize { get; set; } = null!;

        [JsonPropertyName("averageResponseTime")]
        public decimal? MAverageResponseTime { get; set; }

        [JsonPropertyName("averageQuality")]
        public decimal? MAverageQuality { get; set; }

        [JsonPropertyName("averageAttitude")]
        public decimal? MAverageAttitude { get; set; }

        [JsonPropertyName("hiredate")]
        public DateOnly MHiredate { get; set; }

        [JsonPropertyName("finishedRequests")]
        public int MFinishedRequests { get; set; }

        [JsonPropertyName("isResigned")]
        public bool MIsResigned { get; set; }
    }
}